package com.eascs.web.api.view.method;

import java.io.FileNotFoundException;

import com.eascs.web.api.ApiMethodInvokeObject;
import com.eascs.web.api.util.ApiMethodInvokeObjectContext;

public class ApiMethodInvokeObjectViewContext {
	public static ApiMethodInvokeObjectView getApiMethodInvokeObjectView(String methodName) {
		ApiMethodInvokeObject apiMethodInvokeObject = ApiMethodInvokeObjectContext.getMethodInvokeObjectMap().get(methodName);
		if (null == apiMethodInvokeObject) {
			throw new RuntimeException(new FileNotFoundException(methodName));
		}
		ApiMethodInvokeObjectView result = new ApiMethodInvokeObjectView(apiMethodInvokeObject);
		return result;
	}
}
